package com.douwong.student.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


import com.douwong.student.contant.Config;

import java.util.List;
import java.util.Map;

/**
 * @autor yichao
 * @time 2016/11/3013:44
 * @des ${TODO}
 */
public class ClassTestAdapter extends FragmentPagerAdapter {
    private  List<Map<String, Object>> mapList;
    public ClassTestAdapter(FragmentManager fm, List<Map<String, Object>> mapList) {
        super(fm);
        this.mapList=mapList;
    }

    @Override
    public Fragment getItem(int position) {
        return(Fragment)  mapList.get(position).get(Config.FRAGMENT);
    }

    @Override
    public int getCount() {
        return mapList.size();
    }
}
